package com.logic.system.service;

import java.util.HashMap;
import java.util.List;

import com.logic.common.exception.BusinessException;
import com.logic.common.service.ICRUDService;
import com.logic.common.util.QueryUtil;
import com.logic.common.ws.dto.configuration.UserEmployeeDTO;
import com.logic.common.ws.dto.system.UserDTO;
import com.logic.common.ws.dto.system.UserPassChangeDTO;
import com.logic.common.ws.dto.system.UserSearchDTO;
import com.logic.landseaserver.common.exception.LandseaBusinessException;
import com.logic.landseaserver.domain.WeChatUserLogin;
import com.logic.landseaserver.ws.dto.UserPrjRoleDTO;
import com.logic.landseaserver.ws.request.RegisterReq;
import com.logic.system.domain.Organization;
import com.logic.system.domain.Role;
import com.logic.system.domain.User;
import com.logic.system.domain.UserRole;

public interface IUserService extends ICRUDService {

  //String login(LoginDTO dto) throws BusinessException;

  List<Organization> getUserOrganizations(Integer userId);

  User getByLoginId(String loginId);

  List<UserEmployeeDTO> getUserEmployee(QueryUtil queryUtil);

  List<UserSearchDTO> getAllSearchUser();

  List<UserDTO> quickFind(String name);

  List<Role> getRolesByUserId(Integer userId);

  List<UserRole> getUserRolesByUserId(Integer userId);

  List<User> getUsersByRoleCode(String code);
  
  List<User> getAllUserByRoleId(Integer roleId);

  //SYS_PWD_CFG_C_PWD_EXP
  boolean canPWDExpired();

  boolean isCurrentUserPwdExpired();

  Boolean updatePassword(UserPassChangeDTO userPassChangeDTO);

  Integer getT2GUserId();

  Integer getT2OUserId();
  
  Integer getFactoryManagerId(String installVendorId);
  
  List<User> getAllUserByOrgID(Integer orgID);

  void createWechatUser(UserDTO userDTO) throws Exception;

  void deleteWechatUsers(List<String> loginids) throws Exception;

  void updateWechatUser(UserPassChangeDTO userPassChangeDTO,User user);

  void updateWechatUserPw(WeChatUserLogin changePwObj);

  List<String> getUserLoginIdsByIds(String userIDs);

  void updateWechatUser(UserDTO userDTO) throws Exception;

  Boolean updatePasswordByUserId(Integer userId)throws BusinessException;

  HashMap<String, Object> findPhone(String loginId);

  HashMap<String, Object> updateBackPassword(RegisterReq dto) throws LandseaBusinessException;

  UserPrjRoleDTO getPrjsAndRole(Integer userId);

}
